//引入项目中全部的项目组件
import SvgIcon from './SvgIcon/index.vue'
import Paination from './Paination/index.vue'
import categorizeIndex from './Categorize/index.vue'
//全局组件的对象
const allGlobalComponent: any = { SvgIcon, Paination, categorizeIndex }


//element-plus图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//对外暴露插件对象
export default {
  install(app: any) {
    //遍历项目里面的全部的全局组件
    Object.keys(allGlobalComponent).forEach(item => {


      //注册项目的全部的全局组件
      app.component(item, allGlobalComponent[item])
    })
    //把elemenplus图标注册为全局组件
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component)
    }
  }

}